﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Core/MP.Master" AutoEventWireup="true"
    CodeBehind="NewUser.aspx.cs" Inherits="DigitalAmele.WebApp.NewUser1" %>

<%@ Register Src="s3capcha/wucCapcha.ascx" TagName="wucCapcha" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript">
       
            $(document).ready(function () {

                $("#txtUserName").blur(function () {
                    $.ajax({
                        type: "POST",
                        url: "http://localhost:63281/WebServices/wsUserServices.asmx/GetUserName",
                        data: "{userName:'" + $("#txtUserName").val() + "'}",
                        contentType: "application/json; charset=utf-8",
                        dataType: "json",
                        success: function (response) {

                            if (response.d == "")
                                $("#lUserControlSonuc").text("Kullanıcı Adı Uygun");
                            else
                                $("#lUserControlSonuc").text("Kullanıcı Adı Kullanılmakta");
                            //                          $('#output').empty();
                            //                          $.each(cars, function (index, car) {
                            //                              $('#output').append(car);
                            //                          });
                        },
                        failure: function (msg) {
                            $('#lUserControlSonuc').text(msg);
                        }
                    });
                });
            });
        
    </script>
</asp:Content>
<asp:Content ID="Content2" runat="server" ContentPlaceHolderID="ContentPlaceHolder1">
    <table>
        <tr>
            <td class="fr">
                <asp:Literal ID="lUserName" runat="server" Text="Kullanıcı Adı"></asp:Literal>
            </td>
            <td class="TDIkıNokta">
                &nbsp;
            </td>
            <td>
                <asp:TextBox ID="txtUserName" ClientIDMode="Static" runat="server" MaxLength="50"></asp:TextBox>
            </td>
            <td>
                <asp:RequiredFieldValidator ID="txtUserNameFieldValidator" runat="server" CssClass="fl"
                    ControlToValidate="txtUserName" SetFocusOnError="true" Text="*" Display="Dynamic"></asp:RequiredFieldValidator>
                <div ID="lUserControlSonuc"></div>
            </td>
        </tr>
        <tr>
            <td class="fr">
                <asp:Literal ID="lPassword" runat="server" Text="Şifre"></asp:Literal>
            </td>
            <td class="TDIkıNokta">
                &nbsp;
            </td>
            <td>
                <asp:TextBox ID="txtPassword" runat="server" MaxLength="50" TextMode="Password"></asp:TextBox>
            </td>
            <td>
                <asp:RequiredFieldValidator ID="txtPasswordFieldValidator" runat="server" CssClass="fl"
                    ControlToValidate="txtPassword" SetFocusOnError="true" Text="*"></asp:RequiredFieldValidator>
                <asp:CompareValidator ID="txtPassword_CompareValidator" runat="server" ControlToCompare="txtPassword"
                    ControlToValidate="txtPasswordAgain" ErrorMessage="*"></asp:CompareValidator>
            </td>
        </tr>
        <tr>
            <td class="fr">
                <asp:Literal ID="lPasswordAgain" runat="server" Text="Şifre Tekrar"></asp:Literal>
            </td>
            <td class="TDIkıNokta">
                &nbsp;
            </td>
            <td>
                <asp:TextBox ID="txtPasswordAgain" runat="server" MaxLength="50" TextMode="Password"></asp:TextBox>
            </td>
            <td>
                <asp:RequiredFieldValidator ID="txtPasswordAgainFieldValidator0" runat="server" CssClass="fl"
                    ControlToValidate="txtPasswordAgain" SetFocusOnError="true" Text="*"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="fr">
                <asp:Literal ID="lEmail" runat="server" Text="Email Adresi"></asp:Literal>
            </td>
            <td class="TDIkıNokta">
                &nbsp;
            </td>
            <td>
                <asp:TextBox ID="txtEMail" runat="server" MaxLength="50"></asp:TextBox>
            </td>
            <td>
                <asp:RequiredFieldValidator ID="txtEMail_RequiredFieldValidator0" runat="server"
                    CssClass="fl" ControlToValidate="txtEMail" SetFocusOnError="true" Text="*"></asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator ID="txtEmail_RegularExpressionValidator" runat="server"
                    ControlToValidate="txtEMail" ErrorMessage="*" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td class="fr">
                <asp:Literal ID="lSecQues" runat="server" Text="Güvenlik Sorusu"></asp:Literal>
            </td>
            <td class="TDIkıNokta">
                &nbsp;</td>
            <td>
                <asp:DropDownList ID="ddlSecQues" runat="server">
                </asp:DropDownList>
            </td>
            <td>
                <asp:RequiredFieldValidator ID="ddlSecQuesRequiredFieldValidator" runat="server"
                    CssClass="fl" InitialValue="0" ControlToValidate="ddlSecQues" SetFocusOnError="true"
                    Text="*"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="fr">
                <asp:Literal ID="lAnswer" runat="server" Text="Cevap"></asp:Literal>
            </td>
            <td class="TDIkıNokta">
                &nbsp;</td>
            <td>
                <asp:TextBox ID="txtAnswer" runat="server" MaxLength="50" TextMode="Password"></asp:TextBox>
            </td>
            <td>
                <asp:RequiredFieldValidator ID="txtAnswer_RequiredFieldValidator" runat="server"
                    CssClass="fl" ControlToValidate="txtAnswer" SetFocusOnError="true" Text="*"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="fr">
                <asp:Literal ID="lAd" runat="server" Text="Ad"></asp:Literal>
            </td>
            <td class="TDIkıNokta">
                &nbsp;</td>
            <td>
                <asp:TextBox ID="txtName" runat="server" MaxLength="50"></asp:TextBox>
            </td>
            <td>
                <asp:RequiredFieldValidator ID="txtNameFieldValidator0" runat="server" CssClass="fl"
                    ControlToValidate="txtName" SetFocusOnError="true" Text="*" 
                    Display="Dynamic"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="fr">
                <asp:Literal ID="lMiddelName" runat="server" Text="Orta Ad"></asp:Literal>
            </td>
            <td class="TDIkıNokta">
                &nbsp;</td>
            <td>
                <asp:TextBox ID="txtMiddelName" runat="server" MaxLength="50"></asp:TextBox>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td class="fr">
                <asp:Literal ID="lLastName" runat="server" Text="Soyad"></asp:Literal>
            </td>
            <td class="TDIkıNokta">
                &nbsp;</td>
            <td>
                <asp:TextBox ID="txtLastName" runat="server" MaxLength="50"></asp:TextBox>
            </td>
            <td>
                <asp:RequiredFieldValidator ID="txtLastNameFieldValidator1" runat="server" CssClass="fl"
                    ControlToValidate="txtLastName" SetFocusOnError="true" Text="*" 
                    Display="Dynamic"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="fr">
                <asp:Literal ID="lGender" runat="server" Text="Cinsiyet"></asp:Literal>
            </td>
            <td class="TDIkıNokta">
                &nbsp;</td>
            <td>
                <asp:RadioButtonList ID="rblGender" runat="server" RepeatDirection="Horizontal">
                    <asp:ListItem Selected="True" Value="1">Bay</asp:ListItem>
                    <asp:ListItem Value="0">Bayan</asp:ListItem>
                </asp:RadioButtonList>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td class="fr">
                &nbsp;
            </td>
            <td class="TDIkıNokta">
                &nbsp;
            </td>
            <td>
                <uc1:wucCapcha ID="wucCapcha1" runat="server" />
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td class="fr">
                &nbsp;
            </td>
            <td class="TDIkıNokta">
                &nbsp;
            </td>
            <td>
                &nbsp;
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td class="tr">
                <asp:LinkButton ID="lnkBtnSubmit" runat="server" CausesValidation="true" OnClick="lnkBtnSubmit_Click">Gönder</asp:LinkButton>
            </td>
        </tr>
    </table>
</asp:Content>
